package com.example.qxfw.qxxx.service.impl;

import com.example.qxfw.common.entity.qx.Doppler;
import com.example.qxfw.qxxx.mapper.DopplerMapper;
import com.example.qxfw.qxxx.service.DopplerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.sql.Timestamp;
import java.util.List;

@Service
public class DopplerServiceImpl implements DopplerService {

    @Autowired
    private DopplerMapper dopplerMapper;

    @Override
    public List<Doppler> getMaxTime() {
        return dopplerMapper.selectMaxTime();
    }

    @Override
    public List<Doppler> getList(String dateChar, String timeChar1, String timeChar2, String stationId, String idType, String elevation) {
        return dopplerMapper.selectList(dateChar, timeChar1, timeChar2, stationId, idType, elevation);
    }

    @Override
    public List<Doppler> getList(String dateChar1, String timeChar1, String dateChar2, String timeChar2, String stationId, String idType, String elevation) {
        return dopplerMapper.selectLists(dateChar1, timeChar1, dateChar2, timeChar2, stationId, idType, elevation);
    }

    @Override
    public List<Doppler> selectDoppler() {
        return dopplerMapper.selectDoppler();
    }

    @Override
    public List<Doppler> selectDopplerByDateCharLdTypeAndElevation(final String dateCharStart, final String dateCharEnd, final String ldType, float elevation) {
        return dopplerMapper.selectDopplerByDateCharLdTypeAndElevation(Timestamp.valueOf(dateCharStart), Timestamp.valueOf(dateCharEnd), ldType, elevation);
    }

    @Override
    public List<Doppler> selectDopplerByPath(final String path) {
        return dopplerMapper.selectDopplerByPath(path);
    }
}
